#include "gemm.hpp"

Matrix<int> GEMMTester::Baseline(const Matrix<int> &matrix1,
    const Matrix<int> &matrix2) {
  size_t n = matrix1.Row();
  size_t k = matrix1.Col();
  size_t m = matrix2.Col();
  Matrix<int> result(n, m);
  for (size_t i = 0; i < n; ++i) {
    for (size_t j = 0; j < m; ++j) {
      int sum = 0;
      for (size_t l = 0; l < k; ++l) {
        sum += matrix1[i][l] * matrix2[l][j];
      }
      result[i][j] = sum;
    }
  }
  return result;
}

Matrix<int> GEMMTester::Implementation(const Matrix<int> &matrix1,
    const Matrix<int> &matrix2) {
  Matrix<int> result(matrix1.Row(), matrix2.Col());
  // TODO: optimize the GEMM implementation
  return result;
}
